<?php get_header(); ?>
<div id="main">
<?php get_sidebar(); ?>
	<div id="content" class="narrowcolumn">
	<?php if (have_posts()) : ?>
	<?php 	$pauthor = get_option('aq_p_author');
			$pdate = get_option('aq_p_date');
			$pdatebox = get_option('aq_p_datebox');
			$pcats = get_option('aq_p_cats'); ?>

		<?php while (have_posts()) : the_post(); ?>

			<div class="post" id="post-<?php the_ID(); ?>">  
		<?php 
			if ($pdatebox == 1) { ?>
			<div class="datebox">
				<small><?php the_time('M'); ?></small>
				<h3><strong><?php the_time('j'); ?></strong></h3>
			</div>
			<?php } ?>
			<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2><div class="alignright"><img src="<?php echo bloginfo('template_url')?>/images/comment.png" style="vertical-align:-25%;" /><?php comments_popup_link('Comments', '1 Comment', '% Comments'); ?></div>
			<div style=""><small><?php if ($pauthor == 1) { ?><img src="<?php bloginfo('template_url'); ?>/images/author.png" alt="" style="vertical-align:-25%;" /> <?php  the_author_posts_link(); ?>&nbsp;&nbsp;&nbsp;<?php }; if ($pdate == 1) { ?><img src="<?php bloginfo('template_url'); ?>/images/date_written.png" style="vertical-align:-25%;" /> <?php the_time('F jS, Y') ?>&nbsp;&nbsp;&nbsp;<?php }; if ($pcats == 1) { ?><img src="<?php bloginfo('template_url'); ?>/images/category.png" style="vertical-align:-25%;" /> <?php the_category(', ') ?>&nbsp;&nbsp;&nbsp;<?php }; $editpic = get_bloginfo("template_url").'/images/pencil.png'; edit_post_link("<img src=\"$editpic\"  style=\"vertical-align:-25%;\" /> Edit post", '', '  '); ?></small></div>

			<div class="entry">
				<?php
				the_content('Read the rest of this entry &raquo;'); ?>
			</div>
		</div>

		<?php endwhile; ?>

		<div class="navigation">
			<div class="alignleft"><?php next_posts_link('&laquo; Previous Entries') ?></div>
			<div class="alignright"><?php previous_posts_link('Next Entries &raquo;') ?></div>
		</div>

	<?php else : ?>

		<h2 class="center">Not Found</h2>
		<p class="center">Sorry, but you are looking for something that isn't here.</p>
		<?php include (TEMPLATEPATH . "/searchform.php"); ?>

	<?php endif; ?>


	</div>

</div>

<?php get_footer(); ?>
